extends Area2D

var id
@onready var sprite = $Sprite2D

func _ready():
	sprite.frame = id


# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
	position.y += 200 * delta


func _on_body_entered(body):
	body.get_item(id)
	queue_free()


func _on_visible_on_screen_enabler_2d_screen_exited():
	queue_free()
